import request from './request'
export const getRoles = (data) => {
  return request({
    url: 'roles',
    method: 'get'
  })
}

// 添加角色
export const addRoles = (data) => {
  return request({
    url: 'roles',
    method: 'post',
    data
  })
}

// 编辑角色
export const editRoles = (data) => {
  return request({
    url: `roles/${data.id}`,
    method: 'put',
    data
  })
}

// 删除角色
export const deleteRoles = (data) => {
  return request({
    url: `roles/${data.id}`,
    method: 'delete',
    data
  })
}
